package com.ddstation.onsitelaw.utils;

import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class PageResult implements Serializable {
    /**
     * 总记录数
     */
    private long total;
    /**
     * 当前页结果
     */
    private List rows;
    /**
     * 分页总数
     */
    private int pages;

    public PageResult(PageInfo info, List rows) {
        super();
        this.total = info.getTotal();
        this.rows = rows;
        this.pages = info.getPages();
    }
}